﻿using ApplLogic;
using ProductFileGlobalDefs;

namespace ProductFileWcfServices
{
    public class LoginHandlerService : ILoginHandler
    {
        private LoginHandlerManager m_LoginHandlerManager = new LoginHandlerManager();

        public LoginResult Login(LoginData loginData)
        {
            LoginResult loginResult = new LoginResult();
            eUserType userType = eUserType.None;
            loginResult.RetCode = m_LoginHandlerManager.Login(loginData.UserName, loginData.Password, ref userType) == eGeneralRetCode.Ok;
            loginResult.UserType = userType;
            return loginResult;
        }
    }
}
